
% carregar moon amb doubles
%moon = double(moon) / 256;

lf4 = [0 1 0; 1 -4 1; 0 1 0];
lf8 = [1 1 1 ; 1 -8 1; 1 1 1];

moon_lap4 = imfilter(moon,lf4);
moon_lap8 = imfilter(moon,lf8);

moon_e4 = moon - moon_lap4;
moon_e8 = moon - moon_lap8;

figure;
imshow(moon_lap4, []);
figure;
imshow(moon_e4, []);
figure;
imshow(moon_lap8, []);
figure;
imshow(moon_e8, []);